#ifndef _SINGLETON_H
#define _SINGLETON_H

template <class T>
class Singleton {
   protected:
    Singleton() {}
   private:
    Singleton(const Singleton& s) = delete;
    Singleton& operator=(Singleton& s) = delete;

   public:
    virtual ~Singleton() {}
    static T* getInstance() {
        static T _inst;
        return &_inst;
    }
};
#endif
